package com.ruoyi.fireman.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import java.io.Serializable;
import java.util.Date;

/**
 * 文章对象 t_article
 * 
 * @author ruoyi
 * @date 2021-08-31
 */
@TableName(value = "t_article")
public class TArticle implements Serializable
{

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 文章标题 */
    @Excel(name = "文章标题")
    private String title;

    /** 阅读次数 */
    @Excel(name = "阅读次数")
    private Long readNumber;

    /** 封面图片 */
    @Excel(name = "封面图片")
    private String imageUrl;

    /** 文章内容 */
    @Excel(name = "文章内容")
    private String content;

    /** 文章类别t_menu.id */
    @Excel(name = "文章类别t_menu.id")
    private Long tMenuId;

    /** 文章类别名称t_menu.name */
    @TableField(exist = false)
    private String tMenuName;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }
    public void setReadNumber(Long readNumber) 
    {
        this.readNumber = readNumber;
    }

    public Long getReadNumber() 
    {
        return readNumber;
    }
    public void setImageUrl(String imageUrl) 
    {
        this.imageUrl = imageUrl;
    }

    public String getImageUrl() 
    {
        return imageUrl;
    }
    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }
    public void settMenuId(Long tMenuId) 
    {
        this.tMenuId = tMenuId;
    }

    public Long gettMenuId() 
    {
        return tMenuId;
    }

    public String gettMenuName() {
        return tMenuName;
    }

    public void settMenuName(String tMenuName) {
        this.tMenuName = tMenuName;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("title", getTitle())
            .append("createTime", getCreateTime())
            .append("readNumber", getReadNumber())
            .append("imageUrl", getImageUrl())
            .append("content", getContent())
            .append("tMenuId", gettMenuId())
            .append("tMenuName", gettMenuName())
            .toString();
    }
}
